[libcxx] Fix externally-threaded shared library builds after r291275. Need to allow unresolved symbols in the dylib. This was previously done for LIBCXX_HAS_EXTERNAL_THREAD_API, but we have since split that into two with LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY being the externally-threaded variant. Also a minor CMakeLists.txt cleanup. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291433 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dbe8f9..9fa0ed3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -245,16 +245,17 @@ endif() -if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY AND LIBCXX_HAS_EXTERNAL_THREAD_API) - message(FATAL_ERROR "The options LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY and " - "LIBCXX_HAS_EXTERNAL_THREAD_API cannot both be ON at " - "the same time") -endif() - -if(LIBCXX_HAS_PTHREAD_API AND LIBCXX_HAS_EXTERNAL_THREAD_API) - message(FATAL_ERROR "The options LIBCXX_HAS_EXTERNAL_THREAD_API" - "and LIBCXX_HAS_PTHREAD_API cannot be both" - "set to ON at the same time.") +if (LIBCXX_HAS_EXTERNAL_THREAD_API) + if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY) + message(FATAL_ERROR "The options LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY and " + "LIBCXX_HAS_EXTERNAL_THREAD_API cannot both be ON at " + "the same time") + endif() + if (LIBCXX_HAS_PTHREAD_API) + message(FATAL_ERROR "The options LIBCXX_HAS_EXTERNAL_THREAD_API" + "and LIBCXX_HAS_PTHREAD_API cannot be both" + "set to ON at the same time.") + endif() endif() # Ensure LLVM_USE_SANITIZER is not specified when LIBCXX_GENERATE_COVERAGE @@ -460,7 +461,7 @@ endif() # Threading flags ============================================================= -if (LIBCXX_HAS_EXTERNAL_THREAD_API AND LIBCXX_ENABLE_SHARED) +if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY AND LIBCXX_ENABLE_SHARED) # Need to allow unresolved symbols if this is to work with shared library builds if (APPLE) add_link_flags("-undefined dynamic_lookup")